import request from '@/utils/request'



// 保存商户-签约机构
export function saveOrg(data) {
  return request({
    url: '/user/userOrg',
    method: 'post',
    data: data
  })
}

export function saveBank(data) {
  return request({
    url: '/user/userBank/save',
    method: 'post',
    data: data
  })
}

export function getOrgBankInfo() {
  return request({
    url: '/user/userBank/info',
    method: 'get'
  })
}


export function getUserOrgRefresh() {
  return request({
    url: '/user/userOrg/infoRefresh',
    method: 'get'
  })
}

export function getUserOrgSign() {
  return request({
    url: '/user/userOrg/sign',
    method: 'get'
  })
}

export function getUserOrg() {
  return request({
    url: '/user/userOrg/info',
    method: 'get'
  })
}

// 查询商户-签约机构列表
export function listOrg(query) {
  return request({
    url: '/company/org/list',
    method: 'get',
    params: query
  })
}

// 查询商户-签约机构列表
export function userListOrg() {
  return request({
    url: '/user/company/org',
    method: 'get'
  })
}

// 查询商户-签约机构详细
export function getOrg(id) {
  return request({
    url: '/company/org/' + id,
    method: 'get'
  })
}

// 新增商户-签约机构
export function addOrg(data) {
  return request({
    url: '/company/org',
    method: 'post',
    data: data
  })
}

// 修改商户-签约机构
export function updateOrg(data) {
  return request({
    url: '/company/org',
    method: 'put',
    data: data
  })
}

// 删除商户-签约机构
export function delOrg(id) {
  return request({
    url: '/company/org/' + id,
    method: 'delete'
  })
}
